LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := main

SDL_PATH := ../SDL

LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include

#遍历所有*.cpp, *.h, *.c文件, 忽略.*
define all-cpp-files-under
$(patsubst ./%,%, \
  $(shell cd $(LOCAL_PATH)/src ; \
          find $(1) -name "*.cpp" -and -name "*.h" -and -name "*.c" -and -not -name ".*") \
 )
endef

define all-subdir-cpp-files
$(call all-cpp-files-under,.)
endef

LOCAL_SRC_FILES := $(call all-subdir-cpp-files)

# 本来需要手动输入代码文件位置的，然后有了上面的遍历，就再也不用手打了
# LOCAL_SRC_FILES :=  src/Test.cpp \
# src/Test.h \
# src/Luly/Rect.h \
# src/Luly/Rect.cpp\
# src/Luly/PLATFORM.h \
# src/Luly/NinePatch.h \
# src/Luly/NinePatch.cpp\
# src/Luly/main.cpp\
# src/Luly/Luly.h\
# src/Luly/Image.h\
# src/Luly/Image.cpp\
# src/Luly/_Luly.h\
# src/Luly/_Luly.cpp\
# src/Luly/_Image.h\
# src/Luly/_Image.cpp\
# src/Luly/UI/_Color.h\
# src/Luly/UI/_Font.cpp\
# src/Luly/UI/_Font.h\
# src/Luly/UI/_UI.cpp\
# src/Luly/UI/_UI.h\
# src/Luly/UI/Button.cpp\
# src/Luly/UI/Button.h\
# src/Luly/UI/Color.cpp\
# src/Luly/UI/Color.h\
# src/Luly/UI/Font.cpp\
# src/Luly/UI/Font.h\
# src/Luly/UI/ImageView.cpp\
# src/Luly/UI/ImageView.h\
# src/Luly/UI/Layout.h\
# src/Luly/UI/Layout.cpp\
# src/Luly/UI/LulyUI.h\
# src/Luly/UI/Panel.h\
# src/Luly/UI/Panel.cpp\
# src/Luly/UI/Text.h\
# src/Luly/UI/Text.cpp\
# src/Luly/UI/TextView.h\
# src/Luly/UI/TextView.cpp\
# src/Luly/UI/UIObject.h\
# src/Luly/UI/UIObject.cpp\
# src/Luly/UI/vector_map.h\
# src/Luly/UI/VLayout.h\
# src/Luly/UI/VLayout.cpp\
# src/Luly/UI/HLayout.h\
# src/Luly/UI/HLayout.cpp\
# src/Luly/_SoundEffect.h\
# src/Luly/_SoundEffect.cpp\
# src/Luly/SoundEffect.h\
# src/Luly/SoundEffect.cpp\
# src/Luly/_Music.h\
# src/Luly/_Music.cpp\
# src/Luly/Music.h\
# src/Luly/Music.cpp\
# src/Luly/UI/CheckBox.h\
# src/Luly/UI/CheckBox.cpp\
# src/Luly/UI/ScrollView.cpp\
# src/Luly/UI/ScrollView.h\
# src/Luly/UI/HorizontalScrollView.h\
# src/Luly/UI/HorizontalScrollView.cpp\
# src/Luly/UI/ProgressBar.cpp\
# src/Luly/UI/ProgressBar.h\
# src/Luly/UI/VProgressBar.cpp\
# src/Luly/UI/VProgressBar.h





LOCAL_SHARED_LIBRARIES := SDL2 SDL2_image SDL2_mixer SDL2_ttf

LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog

include $(BUILD_SHARED_LIBRARY)
